# 171. 等腰三角形
# https://www.lanqiao.cn/problems/171/learning/?page=1&first_category_id=1&second_category_id=3
# Date: 2025/2/13

def paint_triangle(n: int):
    char_nums = 4 * n - 4  # 总共需要的字符数量 = 腰边长度 + 底边长度 = (2(n-2) + 1) + (2n - 1)

    # 拼接需要的字符串
    nums_str = ""
    i = 1
    while len(nums_str) < char_nums:
        nums_str += str(i)
        i += 1
    nums_str = nums_str[:char_nums]

    print("." * (n - 1) + nums_str[0])

    for i in range(1, n - 1):
        print("." * (n - i - 1) + nums_str[i] + "." * (2 * i - 1) + nums_str[-i])
    print(nums_str[n - 1:-n + 2])


if __name__ == '__main__':
    n = int(input())
    paint_triangle(n)
